package org.bizbundles.support;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Copyright 2007 BizBundle.org
 * <p/>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p/>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p/>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * @author Steve Roach
 * @since: Nov 5, 2007
 * 7:40:25 PM
 */
public final class FileNameHelper
{
    private FileNameHelper()
    {
    }

    /**
     * formats the current date + time into a string to be appended to the basename of the excel spreadsheet
     * @return formatted string with this pattern _MM_dd_yyyy_HH_mm_ss 24hour format
     */
    public static String getDateTimeString()
    {
        SimpleDateFormat format = new SimpleDateFormat("_MM_dd_yyyy_HH_mm_ss");
        Date d = new Date();
        return format.format(d);
    }

}
